import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import * as echarts from 'echarts'
import axios from 'axios'

const app = createApp(App).use(router).mount('#app')


app.echarts=echarts;



/*
var thedata=[];

//实例化axios
const requireA = axios.create({
  baseURL: 'http://127.0.0.1:8080'
})

requireA({
  url:'/api'
}).then(res => {
  console.log(res);
})

requireA({
  url:'/apib'
}).then(res => {
  console.log(res);
  var datas=res["data"];
  thedata.push(datas)
  console.log(thedata,'测试');
})
*/

/* 全局默认配置
axios.defaults.baseURL = 'http://localhost:8080'
axios.defaults.timeout = 1 (超时，毫秒)
*/

/* axios 请求示例
axios({
  url: 'http://123.207.32.32:8000/home/multidata'
}).then(res => {
  console.log(res);
})
axios.get({
  url: 'http://123.207.32.32:8000/home/multidata',
  params: {
    type: 'sell',
    page: 5
  }
}).then(res => {
  console.log(res);
})
axios.all([
  axios({
    url: '/api'
  }),
  axios({
    url: '/apib'
  })
]).then(axios.spread((res1,res2) => {
    console.log(res1);
    console.log(res2);
  }) ))
*/